package com.baidu.dan.generate.utils;

import java.io.UnsupportedEncodingException;

public class StringUtil {
	public static String uppercaseFirstChar(String s){
		return s.substring(0, 1).toUpperCase()+s.substring(1);
	}
	
	public static String lowercaseFirstChar(String s){
		return s.substring(0, 1).toLowerCase()+s.substring(1);
	}
	
	public static String UTF8toGBK(String in){
		String out = null;
		
		return out;
	}
	
	public static String GB2312toUTF8(String in){
		String out = null;
		
		if (null == in) {
			return out;
		}
		
		try {
			byte[] temp = in.getBytes("GB2312");
			out = new String(temp, "UTF8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		
		return out;
	}
}
